﻿* Encoding: UTF-8.

*Total Score Analysis
    
*Select Fall Session
    
DATASET ACTIVATE DataSet1.
USE ALL.
COMPUTE filter_$=(sample = "Fall").
VARIABLE LABELS filter_$ 'sample = "Fall" (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

*descriptives
    
DESCRIPTIVES VARIABLES=Q6_male Q6_female Q6_non_binary Q6_prefer_not Q9_white Q9_black Q9_asian 
    Q9_hispanic Q9_two_more new_other Q16_age soph junior senior other_yr Q10_first_coll Q37_tuition_grant Q89_views partyid pre_COR_TOTAL post_COR_TOTAL
  /STATISTICS=MEAN STDDEV.

CORRELATIONS
  /VARIABLES=Q89_views partyid Q10_first_coll Q37_tuition_grant
  /PRINT=TWOTAIL NOSIG LNODIAG
  /MISSING=PAIRWISE.

*Pre-post WITH covariates including political views AND party ID

GLM pre_COR_TOTAL post_COR_TOTAL WITH soph junior senior other_yr Q6_male Q6_non_binary 
    Q6_prefer_not Q9_white Q9_asian Q9_hispanic Q9_two_more new_other Q16_age Q10_first_coll 
    Q37_tuition_grant Q89_views partyid
  /WSFACTOR=time 2 Polynomial 
  /METHOD=SSTYPE(3)
  /PLOT=PROFILE(time) TYPE=LINE ERRORBAR=CI MEANREFERENCE=NO YAXIS=AUTO
  /EMMEANS=TABLES(time) WITH(soph=MEAN junior=MEAN senior=MEAN other_yr=MEAN Q6_male=MEAN 
    Q6_non_binary=MEAN Q6_prefer_not=MEAN Q9_white=MEAN Q9_asian=MEAN Q9_hispanic=MEAN Q9_two_more=MEAN 
    new_other=MEAN Q16_age=MEAN Q10_first_coll=MEAN Q37_tuition_grant=MEAN Q89_views=MEAN 
    partyid=MEAN)COMPARE ADJ(BONFERRONI)
  /PRINT=DESCRIPTIVE ETASQ 
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=time 
  /DESIGN=soph junior senior other_yr Q6_male Q6_non_binary Q6_prefer_not Q9_white Q9_asian 
    Q9_hispanic Q9_two_more new_other Q16_age Q10_first_coll Q37_tuition_grant Q89_views partyid.


*Select Spring Session
    
DATASET ACTIVATE DataSet1.
USE ALL.
COMPUTE filter_$=(sample = "Spring").
VARIABLE LABELS filter_$ 'sample = "Spring" (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

*descriptives
    
DESCRIPTIVES VARIABLES=Q6_male Q6_female Q6_non_binary Q6_prefer_not Q9_white Q9_black Q9_asian 
    Q9_hispanic Q9_two_more new_other Q16_age soph junior senior other_yr Q10_first_coll Q37_tuition_grant Q89_views partyid pre_COR_TOTAL post_COR_TOTAL
  /STATISTICS=MEAN STDDEV.

CORRELATIONS
  /VARIABLES=Q89_views partyid Q10_first_coll Q37_tuition_grant
  /PRINT=TWOTAIL NOSIG LNODIAG
  /MISSING=PAIRWISE.

*Pre-post WITH covariates including political views AND party ID

GLM pre_COR_TOTAL post_COR_TOTAL WITH soph junior senior other_yr Q6_male Q6_non_binary 
    Q6_prefer_not Q9_white Q9_asian Q9_hispanic Q9_two_more new_other Q16_age Q10_first_coll 
    Q37_tuition_grant Q89_views partyid
  /WSFACTOR=time 2 Polynomial 
  /METHOD=SSTYPE(3)
  /PLOT=PROFILE(time) TYPE=LINE ERRORBAR=CI MEANREFERENCE=NO YAXIS=AUTO
  /EMMEANS=TABLES(time) WITH(soph=MEAN junior=MEAN senior=MEAN other_yr=MEAN Q6_male=MEAN 
    Q6_non_binary=MEAN Q6_prefer_not=MEAN Q9_white=MEAN Q9_asian=MEAN Q9_hispanic=MEAN Q9_two_more=MEAN 
    new_other=MEAN Q16_age=MEAN Q10_first_coll=MEAN Q37_tuition_grant=MEAN Q89_views=MEAN 
    partyid=MEAN)COMPARE ADJ(BONFERRONI)
  /PRINT=DESCRIPTIVE ETASQ 
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=time 
  /DESIGN=soph junior senior other_yr Q6_male Q6_non_binary Q6_prefer_not Q9_white Q9_asian 
    Q9_hispanic Q9_two_more new_other Q16_age Q10_first_coll Q37_tuition_grant Q89_views partyid.

*combine sessions and assess interactions with race_ethnicity and first gen college

FILTER OFF.
USE ALL.
EXECUTE.

GLM pre_COR_TOTAL post_COR_TOTAL BY race_ethnicity Q10_first_coll WITH junior senior other_yr 
    Q16_age Q37_tuition_grant Q6_male Q6_non_binary Q6_prefer_not Q89_views
  /WSFACTOR=time 2 Polynomial 
  /METHOD=SSTYPE(3)
  /PLOT=PROFILE(time time*race_ethnicity time*Q10_first_coll) TYPE=LINE ERRORBAR=NO 
    MEANREFERENCE=NO YAXIS=AUTO
  /EMMEANS=TABLES(time) WITH(junior=MEAN senior=MEAN other_yr=MEAN Q16_age=MEAN 
    Q37_tuition_grant=MEAN Q6_male=MEAN Q6_non_binary=MEAN Q6_prefer_not=MEAN Q89_views=MEAN)COMPARE 
    ADJ(BONFERRONI)
  /EMMEANS=TABLES(race_ethnicity*time) WITH(junior=MEAN senior=MEAN other_yr=MEAN Q16_age=MEAN 
    Q37_tuition_grant=MEAN Q6_male=MEAN Q6_non_binary=MEAN Q6_prefer_not=MEAN 
    Q89_views=MEAN)COMPARE(race_ethnicity) ADJ(BONFERRONI)
  /EMMEANS=TABLES(race_ethnicity*time) WITH(junior=MEAN senior=MEAN other_yr=MEAN Q16_age=MEAN 
    Q37_tuition_grant=MEAN Q6_male=MEAN Q6_non_binary=MEAN Q6_prefer_not=MEAN 
    Q89_views=MEAN)COMPARE(time) ADJ(BONFERRONI)
  /EMMEANS=TABLES(Q10_first_coll*time) WITH(junior=MEAN senior=MEAN other_yr=MEAN Q16_age=MEAN 
    Q37_tuition_grant=MEAN Q6_male=MEAN Q6_non_binary=MEAN Q6_prefer_not=MEAN 
    Q89_views=MEAN)COMPARE(Q10_first_coll) ADJ(BONFERRONI)
  /EMMEANS=TABLES(Q10_first_coll*time) WITH(junior=MEAN senior=MEAN other_yr=MEAN Q16_age=MEAN 
    Q37_tuition_grant=MEAN Q6_male=MEAN Q6_non_binary=MEAN Q6_prefer_not=MEAN 
    Q89_views=MEAN)COMPARE(time) ADJ(BONFERRONI)
  /PRINT=DESCRIPTIVE ETASQ HOMOGENEITY 
  /CRITERIA=ALPHA(.05)
  /WSDESIGN=time 
  /DESIGN=junior senior other_yr Q16_age Q37_tuition_grant Q6_male Q6_non_binary Q6_prefer_not 
    Q89_views race_ethnicity Q10_first_coll race_ethnicity*Q10_first_coll.
